package com.zjkj.mp.vo.finance;

import java.util.Date;

/**
 * 财务明细
 * @author wxd
 *
 */
public class FinanceItem {
	private int id;
	private String userName;
	private int userId;
	
	/** 操作类型 */
	private String operateType;
	/** 变动数量*/
	private long changeCount ;
	/** 变动后的余额*/
	private long balance;
	/** 操作时间 */
	private  Date operateDate;
	/** 备注*/
	private String note;
	 
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	 
	public long getChangeCount() {
		return changeCount;
	}
	public void setChangeCount(long changeCount) {
		this.changeCount = changeCount;
	}
	public long getBalance() {
		return balance;
	}
	public void setBalance(long balance) {
		this.balance = balance;
	}
	public Date getOperateDate() {
		return operateDate;
	}
	public void setOperateDate(Date operateDate) {
		this.operateDate = operateDate;
	}
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FinanceItem other = (FinanceItem) obj;
		if (id != other.id)
			return false;
		return true;
	} 
	
	/**
	 * 得到财务明细类型的中文名称
	 */
	public String getOperateName( ){
			return FinanceItemType.getName(this.operateType);
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
 
	public String getOperateType() {
		return operateType;
	}
	public void setOperateType(String operateType) {
		this.operateType = operateType;
	}
	@Override
	public String toString() {
		return "FinanceItem [id=" + id + ", userName=" + userName + ", userId="
				+ userId + ", operateType=" + operateType + ", changeCount="
				+ changeCount + ", balance=" + balance + ", operateDate="
				+ operateDate + ", note=" + note + "]";
	}
}